In [2]:
%pylab
from __future__ import print_function
In [2]:
where
where
The absolute minimum power for flapping flight is given by:
$$ P_{mp} = \frac{1.05 k^{3/4} m^{3/2} g^{3/2} S_b^{1/4} C_{Db}^{1/4}}{\rho^{1/2}B^{3/2}} $$$$ V_{mp} = \frac{0.807 k^{1/4}m^{1/2}g^{1/2}}{\rho^{1/2}B^{1/2}S_b^{1/4}C_{Db}^{1/4}}$$$$f = m^{3/8}g^{1/2}B^{-23/24}S^{-1/3}\rho^{-3/8}$$where
In [3]:
# vehicle
B = 1.2 # wing span, m
C_Db = 0.1 # body drag coeff, m
k = 1.1 # induced power factor
m = 0.3 # mass
S_b = 0.003 # body frontal area
S = B/6
cf_E = 70e6
cf_ult_stress = 1.6e6
cf_dens = 1500
# environment
g = 9.8
rho = 1.225
P_mp = 1.05*k**(0.75)*m**(1.5)*g**(1.5)*\
S_b**(0.25)*C_Db**(0.25)*rho**(-0.25)*B**(-1.5)
V_mp = 0.807*k**0.25*m**0.5*g**0.5*\
rho**-0.5*B**-0.5*S_b**-0.25*C_Db**-0.25
f_mp = m**(3.0/8)*g**0.5*B**(-23.0/24)*S**(-1.0/3)*rho**(-3.0/8)
P_mp, V_mp
print("""P_mp: {P_mp:f} Watts
V_mp: {V_mp:f} m/s
f_mp: {f_mp:f} Hz""".format(**locals()))
In [4]:
S_d = pi*B**2/4
A = S_b*C_Db
V_mr = k**0.25*m**0.5*g**0.5*rho**-0.5*A**-0.25*S_d**-0.25
P_mr = k**0.75*m**1.5*g**1.5*A**0.25*rho**-0.25*S_d**-0.75
V_mr, P_mr
Out[4]:
In [53]:
ozIn2Nm = 0.00706155183333
T_servo = 300*ozIn2Nm # oz-in
omega_servo = deg2rad(60/0.06) # rad/s
eff_servo = 0.001 # total efficiency, setting to match Robo Raven performance
V_servo = 7.4 # volts
C_bat = 0.370 # battery capacity Ah
d_bat = 20 # battery discharge rating
In [86]:
P_servos = 2*T_servo*omega_servo # watts, note 2 servos
A_servos = P_servos/ V_servo
flight_time = C_bat/A_servos*60 # minutes
A_bat = d_bat*C_bat
flight_time_mp = 4.75
A_mp = C_bat/flight_time_mp*60
eff_servo = P_mp/V_servo/A_mp
P_mp_eff = P_mp/eff_servo
print("""
min power
===========
flight time\t:{flight_time_mp:10.3f} min
P\t\t:{P_mp_eff:10.3f} Watts
A\t\t:{A_mp:10.3f} A
full power
===========
flight time\t:{flight_time:10.3f} min
P\t\t:{P_servos:10.3f} Watts
A\t\t:{A_servos:10.3f} A
battery
===========
A bat\t\t:{A_bat:10.3f} A
"""\
.format(**locals()))
We see that the battery is capable of supply the required discharge rate ($A_{bat} > A_{min\_power}$).
Calculated efficiency, so endurance mataches RoboRaven.
In [27]:
eff_servo*P_servos - P_mr
Out[27]:
Excess Power
In [91]:
import scipy.optimize
def neg_excess_power(x):
# design vector
B = x[0] # wing span
r_f = x[1] # diameter of fuselage rod
t_f = x[2]
# guess at structure relationship for now
m = 4*pi*r_f*t_f*cf_dens
S_b = B**2
A = S_b*C_Db
P_mp = 1.05*k**(0.75)*m**(1.5)*g**(1.5)*\
S_b**(0.25)*C_Db**(0.25)*rho**(-0.25)*B**(-1.5)
return -(P_servos - P_mp)
def stress_bend(x):
# design vector
B = x[0] # wing span
r_f = x[1] # radius of fuselage rod
t_f = x[2]
M = B**2/6 # moment scales by square of length
y = r_f
I = pi*r_f**3*t_f
return M*y/I
def stress_buckle(x):
# design vector
B = x[0] # wing span
r_f = x[1] # radius of fuselage rod
t_f = x[2]
I = pi*r_f**3*t_f
K = 2 # buckling with one end free
F = pi**2*cf_E*I/(K*B**2)
A = 2*pi*r_f*t_f
return F/A
def con_bending(x):
return -(cf_ult_stress - stress_bend(x))
def con_buckling(x):
return -(stress_buckle(x) - stress_bend(x))
def callback(x):
print(x)
x0 = [1, 1, 1]
constraints= [
#{'type':'ineq', 'fun':con_bending},
#{'type':'ineq', 'fun':con_buckling},
]
options = {'disp':True, 'iprint':2}
bounds = [(0.1,10), (0.1,10), (0.1,10)]
#bounds = None
method = 'slsqp'
res = scipy.optimize.minimize(neg_excess_power, x0, method=method, bounds=bounds,
constraints=constraints, options = options, callback=callback)
res
Out[91]: